package oa.hleast.xswl.service.blog;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import oa.hleast.xswl.pojo.domain.blog.UmsBlogInfo;
import oa.hleast.xswl.pojo.form.blog.BlogDisplayForm;
import oa.hleast.xswl.pojo.form.blog.ReviewForm;
import oa.hleast.xswl.pojo.form.blog.UmsBlogCommentForm;
import oa.hleast.xswl.pojo.form.blog.UmsBlogInfoForm;
import oa.hleast.xswl.pojo.vo.blog.UmsBlogCommentVo;
import oa.hleast.xswl.pojo.vo.blog.UmsBlogInfoVo;
import oa.hleast.xswl.pojo.vo.blog.UmsBlogTableVo;

import java.util.List;

public interface IBlogInfoService extends IService<UmsBlogInfo> {
    boolean add(Long userId, String ipHost, String ipCity, UmsBlogInfoForm cmsAppsIconForm);

    boolean update(UmsBlogInfoForm cmsAppsIconForm);

    Page<UmsBlogInfoVo> pageList(Integer page, Integer limit, Long userId, Integer display, Integer commentStatus, boolean isSort, boolean isAll);

    boolean deleteByIds(List<String> asList);

    UmsBlogInfoVo detail(Long id);


    boolean likeBlog(Long blogId, Long userId);

    boolean isComment(Long blogId, Long userId);

    boolean isLike(Long blogId, Long userId);

    boolean commentBlog(UmsBlogCommentForm form, Long userId);

    List<UmsBlogCommentVo> findCommentList(Long blogId, Long userId);

    boolean updateComment(Long userId, UmsBlogInfoForm form);

    boolean del(Long userId, Long blogId);

    boolean reviewBlog(ReviewForm form);

    UmsBlogTableVo saveTable(Long userId, String name);

    boolean updateHot(Long id, Boolean hot);

    boolean updateDisplay(Long id, Boolean display, String downReason);

    boolean delBlog(Long id, String reason);

    boolean updateHotList(List<Long> idList, boolean hot);

    boolean updateDisplayList(BlogDisplayForm form, boolean display);
}
